package org.sws.infrastructure.persistent.dao;

import cn.bugstack.middleware.db.router.annotation.DBRouter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.sws.domain.activity.model.entity.ActivityAccountEntity;
import org.sws.infrastructure.persistent.po.RaffleActivityAccount;

/**
* @author joyboy
* @description 针对表【raffle_activity_account(抽奖活动账户表)】的数据库操作Mapper
* @createDate 2025-03-18 11:55:36
* @Entity po.domain.RaffleActivityAccount
*/
@Mapper
public interface IRaffleActivityAccountDao {

    int updateAccountQuota(RaffleActivityAccount raffleActivityAccount);

    void insert(RaffleActivityAccount raffleActivityAccount);

    @DBRouter
    ActivityAccountEntity queryActivityAccountByUserId(@Param("userId") String userId, @Param("activityId") Long activityId);

    int updateAccountSubtractionQuota(RaffleActivityAccount raffleActivityAccount);

    void updateActivityAccountMonthSubtractionQuota(RaffleActivityAccount activityAccount);

    void updateActivityAccountDaySubtractionQuota(RaffleActivityAccount activityAccount);

    void updateActivityAccountMonthSurplusImageQuota(RaffleActivityAccount activityAccount);

    void updateActivityAccountDaySurplusImageQuota(RaffleActivityAccount activityAccount);

    @DBRouter
    Integer queryRaffleActivityAccountTotalPartakeCount(RaffleActivityAccount raffleActivityAccount);
    RaffleActivityAccount queryAccountByUserId(RaffleActivityAccount raffleActivityAccount);
}




